<?php   	  
	  $arrData2[0][1] = "MKI";
	  $arrData2[1][1] = "NSI";
	  $arrData2[2][1] = "PRO";
	  $arrData2[3][1] = "AUL";
	  
	  $index=rand(1,2);
	  //Juli
	  $arrData2[0][2] = 532750000;
	  $arrData2[1][2] = 0;
	  $arrData2[2][2] = 287500000;
	  $arrData2[3][2] = 0;
	
	//Agustus
	 $arrData2[0][3] = 222500000;
	 $arrData2[1][3] = 84000000;
	 $arrData2[2][3] = 25000000;
	 $arrData2[3][3] = 121000000;
	 
	 //September
	 $arrData2[0][4] = 394000000;
	 $arrData2[1][4] = 0;
	 $arrData2[2][4] =25000000;
	 $arrData2[3][4] = 0;
	 
	 //Triwulan
	 $arrData2[0][5] = $arrData2[0][1]+$arrData2[0][2]+$arrData2[0][3]+$arrData2[0][4];
	 $arrData2[1][5] = $arrData2[1][1]+$arrData2[1][2]+$arrData2[1][3]+$arrData2[1][4];;
	 $arrData2[2][5] = $arrData2[2][1]+$arrData2[2][2]+$arrData2[2][3]+$arrData2[2][4];;
	 $arrData2[3][5] = $arrData2[3][1]+$arrData2[3][2]+$arrData2[3][3]+$arrData2[3][4];;
	
	 	
      $xmlData = "<graph bgColor='#FFFFFF' caption='Revenue'  animation='1'  canvasBorderColor='FFFFFF' showBorder='0' xAxisName='Time' yAxisName='Total' showNames='1' decimalPrecision='0' formatNumberScale='0'>";  
      $animation="<style name='CanvasAnim' type='animation' param='_xScale' start='5' duration='2' />";
	  $strCategories = "<categories>";
	  $strDataCurr = "<dataset seriesName='Juli'>";
	  $strDataPrev = "<dataset seriesName='Agustus'>";
	  $strDataNext = "<dataset seriesName='September'>";
	  $strDataBeep = "<dataset seriesName='Triwul 3'>";	
	  
	 
	  foreach ($arrData2 as $arSubData) {
        $strCategories .= "<category name='" . $arSubData[1] . "' />";
        $strDataCurr .= "<set value='" . $arSubData[2] . "' />";
        $strDataPrev .= "<set value='" . $arSubData[3] . "' />";
		$strDataNext .= "<set value='" . $arSubData[4] . "' />";
		$strDataBeep .= "<set value='" . $arSubData[5] . "' />";
		
	  }	
	  
	  $strCategories .= "</categories>";
	  $strDataCurr .= "</dataset>";
	  $strDataPrev .= "</dataset>";
	  $strDataNext .= "</dataset>";
	  $strDataBeep .= "</dataset>";	
      $xmlData .= $animation.$strCategories . $strDataCurr . $strDataPrev .$strDataNext . $strDataBeep . "</graph>"; 
      //mysql_query("INSERT INTO price_fluctuation (update_datetime, price) VALUES (now(), " . rand(1000, 5000) . ")", $dbConn);  
       
      echo $xmlData;  
    ?>  